import openpyxl
wb = openpyxl.Workbook()
ws = wb.active
#ws.sheet_properties.tabColor = "1072BA"
for i in range(1, 11):
    ws['A'+str(i)]=i
value = openpyxl.chart.Reference(ws, min_row = 1, min_col = 1, max_row = 10, max_col = 1)
chart = openpyxl.chart.BarChart()
chart.add_data(value)
ws.add_chart(chart, "E5")
wb.save('sampleChart.xlsx')